/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bean.timer;

import java.awt.BorderLayout;
import java.awt.FontFormatException;
import java.awt.GridLayout;
import java.beans.*;
import java.io.IOException;
import java.io.Serializable;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPanel;

/**
 *
 * @author sammael
 */
public class CompositeTimer extends JPanel implements Serializable {
    
    
    private PropertyChangeSupport propertySupport;
    private Timer timer;
    private TimerButton startButton,resetButton; 
    
    
    public CompositeTimer() {
        propertySupport = new PropertyChangeSupport(this);
            this.setLayout(new BorderLayout(5, 5));
        try {
            timer = new Timer();
            startButton = new TimerButton();
            resetButton = new TimerButton();
        } catch (FontFormatException | IOException | URISyntaxException ex) {
            Logger.getLogger(CompositeTimer.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        JPanel panel = new JPanel(new GridLayout(1, 2, 30, 30));
        panel.add(startButton);
        panel.add(resetButton);
        this.add(timer);
        this.add(panel,BorderLayout.SOUTH);
    }
    
    
    
}
